import request from '@/config/axios'

class News {
	getNews(data : any) : Ajax.PromiseAxiosResponse<any> {
		return request.get({
			url: '/news/getNews', params:data
		})
	}
	addNews(data : any) : Ajax.PromiseAxiosResponse<any> {
		return request.post({
			url: '/news/addNews', data
		})
	}
	getDetail(data : any) : Ajax.PromiseAxiosResponse<any> {
		return request.get({
			url: '/news/getDetail', params:data
		})
	}
}

export const NewsApi = new News()